<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

<script>
// alert()
// console.log()
// document.write()
// 设置断点测试

/* var sum = 0;
for (var i = 0; i < 10; i++) {
    sum += i;
    // 1.设置断点,当程序执行到debugger时,暂停执行
    debugger;

    console.log( i,sum );
} */


// 2.直接在浏览器控制台的sources选项,直接点击需要打断点的行号
var sum = 1;
for (var i = 0; i < 10; i++) {
    sum += i;
    console.log( i,sum );
}

</script>
</body>
</html>